home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / unix / ch24 / 24fig07.wrl < prev    next >
Text File  |  1996-09-23  |  1KB  |  80 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Chassis
  8.         Shape {
  9.             appearance Appearance {
  10.                 material Material { diffuseColor 0.3 0.3 0.3 }
  11.             }
  12.             geometry Box { size 5.0 3.5 2.0 }
  13.         },
  14.     # Controls
  15.         Shape {
  16.             appearance Appearance {
  17.                 material Material { }
  18.                 texture ImageTexture {
  19.                     url "tvcntrl.jpg"
  20.                     repeatS FALSE
  21.                     repeatT FALSE
  22.                 }
  23.             }
  24.             geometry IndexedFaceSet {
  25.                 coord Coordinate {
  26.                     point [
  27.                         1.75 -1.5 1.01,  2.40 -1.5 1.01,
  28.                         2.40  1.5 1.01,  1.75  1.5 1.01,
  29.                     ]
  30.                 }
  31.                 coordIndex [ 0, 1, 2, 3 ]
  32.                 texCoord TextureCoordinate {
  33.                     point [
  34.                         0.0 0.0,  1.0 0.0,
  35.                         1.0 1.0,  0.0 1.0
  36.                     ]
  37.                 }
  38.             }
  39.         },
  40.     # Screen
  41.         Shape {
  42.             appearance Appearance {
  43.                 material Material {
  44.                     diffuseColor 0.0 0.0 0.0
  45.                     emissiveColor 1.0 1.0 1.0
  46.                 }
  47.                 texture DEF TV MovieTexture {
  48.                     url "tv.mpg"
  49.                     loop FALSE
  50.                     repeatS FALSE
  51.                     repeatT FALSE
  52.                 }
  53.             }
  54.             geometry IndexedFaceSet {
  55.                 coord Coordinate {
  56.                     point [
  57.                         -2.35 -1.5 1.01,
  58.                          1.65 -1.5 1.01,
  59.                          1.65  1.5 1.01,
  60.                         -2.35  1.5 1.01
  61.                     ]
  62.                 }
  63.                 coordIndex [ 0, 1, 2, 3 ]
  64.             }
  65.         },
  66.     # Sound
  67.         Sound {
  68.             # Use MovieTexture as sound source
  69.             source USE TV
  70.             minFront 30.0
  71.             minBack  30.0
  72.             maxFront 100.0
  73.             maxBack  100.0
  74.         },
  75.     # Trigger on touch
  76.         DEF Touch TouchSensor { }
  77.     ]
  78. }
  79. ROUTE Touch.touchTime TO TV.set_startTime
  80.